import 'package:flutter/material.dart';

import 'package:get/get.dart';
import 'package:getwidget/components/loader/gf_loader.dart';
import 'package:getwidget/size/gf_size.dart';
import 'package:getwidget/types/gf_loader_type.dart';

import '../controllers/gfloader_controller.dart';

class GfloaderView extends GetView<GfloaderController> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('加载器'),
        centerTitle: true,
      ),
      body: Container(
        margin: EdgeInsets.all(10),
        child: ListView(
          children: [
            GFLoader(),
            Divider(),

            GFLoader(
              type:GFLoaderType.ios
            ),
            Divider(),

            GFLoader(
              type:GFLoaderType.circle
            ),
            Divider(),

            GFLoader(
              type:GFLoaderType.square
            ),
            Divider(),

            GFLoader(
              type:GFLoaderType.android,
              size: GFSize.SMALL
            ),
            Divider(),

            GFLoader(
              type: GFLoaderType.custom,
              loaderIconOne   : Icon(Icons.insert_emoticon),
              loaderIconTwo   : Icon(Icons.insert_emoticon),
              loaderIconThree : Icon(Icons.insert_emoticon),
            ),
            Divider(),

            GFLoader(
              type: GFLoaderType.custom,
              loaderIconOne   : Text('Please'),
              loaderIconTwo   : Text('Wait'),
              loaderIconThree : Text('a moment'),
            ),
          ],
        ),
      ),
    );
  }
}
